<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="utf-8">
    <title>订单详情</title>
<%@ include file="../common/link.jsp" %>
<%@ include file="../common/script.jsp" %>
<link rel="stylesheet" type="text/css" href="../css/xcConfirm.css"/>
<script src="../js/jquery-1.9.1.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/xcConfirm.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
	.sgBtn{width: 135px; height: 35px; line-height: 35px; margin-left: 10px; margin-top: 10px; text-align: center; background-color: #0095D9; color: #FFFFFF; border-radius: 5px;}
</style>
<script type="text/javascript">
$(window).load(function(){
	$('#demo-side-bar').removeAttr('style');
});
$(function(){

	$("#btn1").click(function(){
		var txt=  "你来晚喽，快去抢其他订单吧！！！";
		window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
	});
});
$(function(){

	$("#btn2").click(function(){
		var txt=  "该订单已完成，快去抢其他订单吧！！！";
		window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
	});
});
</script>
<style type="text/css">
.demobar{display:none;}
#demo-side-bar{top:53px!important;left:90%!important;display:block!important;}
</style>
<%@ include file="../common/header.jsp" %>
    <!-- START CONTENT -->
    <section class="container clearfix">
        <!-- Page Title -->
        <header class="container page_info clearfix">

            <h1 class="regular brown bottom_line">订单详情</h1>

            <div class="clear"></div>
        </header>

        <!-- /Page Title -->

        <div class="col-md-6">
            <c:if test="${!empty orderDetail }">
            <table class="table table-hover table-bordered">
                <tbody>
                <tr>
                    <th><h4>编号</h4></th>
                    <td><h6>${orderDetail.hoId }</h6></td>
                </tr>
                <tr class="active">
                    <th class="text-center"><h4>取货码</h4></th>
                    <td><h6>${orderDetail.emgId }</h6></td>
                </tr>
                <tr class="info">
                    <th class="text-center"><h4>取货地址</h4></th>
                    <td><h6>${orderDetail.hoStplace }</h6></td>
                </tr>
                <tr class="info">
                    <th class="text-center"><h4>送货地址</h4></th>
                    <td><h6>${orderDetail.hoPlace }</h6></td>
                </tr>
                <tr class="warning">
                    <th class="text-center"><h4>代取报酬</h4></th>
                    <td><h6>${orderDetail.hoPrice }</h6></td>
                </tr>
                <tr class="warning">
                    <th class="text-center"><h4>状态</h4></th>
                    <td><h6>
                    <c:if test="${orderDetail.hoState==0 }">
                    	未抢
                    </c:if>
                    <c:if test="${orderDetail.hoState==1 }">
                    	已抢
                    </c:if>
                    <c:if test="${orderDetail.hoState==2 }">
                    	完成
                   	</c:if>
                    </h6></td>
                </tr>
                <tr class="warning">
                    <th class="text-center"><h4>时间</h4></th>
                    <td><h6>${orderDetail.hoTime }</h6></td>
                </tr>
                <tr class="warning">
                    <th class="text-center"><h4>备注</h4></th>
                    <td><h6>${orderDetail.hoRemark }</h6></td>
                </tr>
                </tbody>
            </table>
            <div align="center">
            	<c:choose>
            		<c:when test="${orderDetail.hoState==0 }">
            			<a href="${pageContext.request.contextPath}/order/changeState?userId=${sessionScope._LOGIN_USER_.userId }&hoId=${orderDetail.hoId }&hoState=${orderDetail.hoState}&goTime=${orderDetail.hoTime}" class="button green">抢单</a>
            		</c:when>
            		<c:when test="${orderDetail.hoState==1 }">
            			<div  class="span4"></div>
            			<div class="span4" id="btn1" style="width: 100px; height: 35px; line-height: 35px; margin-left: 10px; margin-top: 10px; text-align: center; background-color: #0095D9; color: #FFFFFF; border-radius: 5px;">抢单</div>
            			<div  class="span4"></div>
            		</c:when>
            		<c:when test="${orderDetail.hoState==2 }">
            			<div  class="span4"></div>
            			<div class="span4" id="btn2" style="width: 100px; height: 35px; line-height: 35px; margin-left: 10px; margin-top: 10px; text-align: center; background-color: #0095D9; color: #FFFFFF; border-radius: 5px;">抢单</div>
            			<div  class="span4"></div>
            		</c:when>
            	</c:choose>
            </div>
            </c:if>
        </div>
        <div class="clear padding20"></div>
        <div class="clear"></div>
    </section>
    <!-- END CONTENT -->
<%@ include file="../common/footer.jsp" %>  
</body>
</html>